<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="liYunLong">你真是个天才!</div>
</body>
</html>
<script>
    var tools={
        el:null,
        $(name){
            this.el=document.querySelector(name)
            if(!this.el) return alert('dom不存在')
            return this
        },
        setColor(color){
            this.el.style.color=color
            return this
        },
        setFontSize(size){
            this.el.style.fontsize=size  
            return this
        },
        click(hhh){
            this.el.onclick=function(){
                alert(hhh)
            }
        }
    }
    tools.$("#liYunLong").setColor('red').setFontSize('30').click('你呀，总能给我整点花样')
</script>